//迭代求阶乘
#include <stdio.h>
int main()
{
    int n = 0;
    scanf("%d", &n);
    int sum = 1;
    while(n)
    {
        sum *= n--;
    }
    printf("%d\n", sum);
    return 0;
}